<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title></title>
</head>
<script>
	function loginform() {
		alert(123);
		if (document.login.username.value == "张三" && document.login.userpassword.value == "123456") {
			alert(456);
			location.href = "index.html";
		} else {
			return false;
		}
	}

</script>

<body>
	<form name="login">
		<h4 align="center"><b>欢迎登陆学生管理系统</b></h4><br>
		<table align="center">
			<tr>
				<td>请输入账号：</td>
				<td><input name="username" type="text"> </td>
			</tr>
			<tr>
				<td>请输入密码：</td>
				<td><input name="userpassword" type="password"> </td>
			</tr>
			<tr>
				<td></td>
				<td><input type="button" value="登录" onclick="loginform()"> <input type="button" value="注冊"></td>
			</tr>
		</table>
	</form>

</body>

</html>